id(), SavedSearchMailings::GetFrequencyOptions(User::getCurrentUser()), $Item->frequency() ); $OptList->submitOnChange(true); return $OptList->getHtml(); } # ----- MAIN ----------------------------------------------------------------- PageTitle("Manage Saved Searches"); $MailingsEnabled = $GLOBALS["G_PluginManager"]->pluginEnabled( "SavedSearchMailings" ); $BaseLink = "index.php?P=ListSavedSearches"; $EditLink = "index.php?P=AdvancedSearch&ID=\$ID"; $DeleteLink = "index.php?P=ListSavedSearches&AC=Delete&ID=\$ID&" .TransportControlsUI::PNAME_STARTINGINDEX."=".$H_StartingIndex; $Fields = [ "SearchName" => [ "Heading" => "Search Name", "MaxLength" => 80, "AllowHTML" => true, "ValueFunction" => function ($Item) { return "" .htmlspecialchars($Item->searchName()).""; }, ], "Search Criteria" => [ "AllowHTML" => true, "ValueFunction" => function ($Item) { return $Item->searchParameters()->textDescription(); }, ], ]; if ($MailingsEnabled) { $Fields["Email"] = [ "AllowHTML" => true, "ValueFunction" => "GetEmailFrequency", ]; } $ListUI = new ItemListUI($Fields); $ListUI->noItemsMessage("There are no searches currently saved. You can enter and save a search via the Advanced Search page."); $ListUI->heading("Saved Searches"); $ListUI->baseLink($BaseLink); $ListUI->addActionButton("Edit", $EditLink); $ListUI->addActionButton("Delete", $DeleteLink); $ListUI->itemsPerPage($H_ItemsPerPage); $ListUI->fieldsSortableByDefault(false); ?> display($H_SavedSearches, $H_SearchCount, $H_StartingIndex); ?>